package com.allwees.bs.core.model.order.entity;

import com.allwees.bs.core.model.order.wf.order.EOrderState;
import com.allwees.bs.core.model.order.wf.refund.ERefundAction;
import com.allwees.bs.core.model.order.wf.refund.ERefundState;
import com.allwees.bs.core.model.wf.entity.WorkflowEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.MappedSuperclass;
import java.math.BigDecimal;
import java.util.Date;

@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@MappedSuperclass
public class OrderRefundModel extends WorkflowEntity<ERefundState, ERefundAction> {

    @Column(length = 64)
    protected String orderUuid;

    private String orderNo;

    @Column(length = 64)
    protected String orderItemUuid;

    @Column(length = 64)
    protected String retailerUuid;

    @Column(length = 64)
    protected String supplierUuid;

    @Column(length = 64)
    protected String storeUuid;

    protected String productUuid;

    @Enumerated(EnumType.STRING)
    protected EOrderState orderState;

    protected Integer orderShippingState;
    /**
     * paypal实付
     */
    protected BigDecimal refundAmt;

    protected String currency;

    protected Integer type;

    protected Integer reason;

    @Column(length = 4096)
    protected String remark;

    protected String photos;

    protected Date succeedAt;

    /**
     * 退款原始金额
     */
    protected BigDecimal originalRefundAmt;

    /**
     * 原始商品总价
     */
    protected BigDecimal originalAmtSku;

    /**
     * 原始运费总价
     */
    protected BigDecimal originalAmtShipping;

    /**
     * 退款总金额
     */
    protected BigDecimal refundTotalAmt;

    /**
     * 商品退款
     */
    protected  BigDecimal refundProductAmt;
    /**
     *  运费退款
     */
    protected BigDecimal refundShippingAmt;

    /**
     * 支付方式
     */
    protected String  payType;

    /**
     * Cash退款
     */
    protected BigDecimal  refundAmtCash;

    /**
     * Paypal退款
     */
    protected BigDecimal  refundAmtPaypal;

    /**
     * 买家id
     */
    protected String userUuid;


    /**
     * 商品自定义编号
     */
    protected  String defNo;
}
